package sk.naive.talker.props;

import java.util.Set;

/**
 *
 * @author <a href="mailto:richter@bgs.sk">Richard Richter</a>
 * @version 1.0 25.5.2003
 */
public interface Property {
	public boolean checkValue(Object o);
	public Object defaultValue();

	/**
	 * Returns set of valid values (set of Strings).
	 * <p>
	 * Returned Set should be Serializable because there is a strong
	 * expectation that this method is called (indirectly) from talker also
	 * on adapter properties. E.g. when user has to be informed about possible
	 * values of some property this method is involved.
	 * <p>
	 * Returned set is mainly for informative purposes - there is no
	 * rule that valid values are contained in the returned set. Set
	 * can possibly return narrative information String. Programmer
	 * should know which property has closed set of valid values.
	 *
	 * @return information about valid values for this property in a Set
	 */
	public Set<String> validValues();

	public String toString(Object o);
	public Object toObject(String s);
}
